<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="../static/layui/css/layui.css" />
    <link rel="stylesheet" type="text/css" href="../static/css/admin.css" />
</head>

<body>
<div class="page-content-wrap">
  <div class="layui-row">
      <div class="layui-col-xs5 layui-col-sm4 layui-col-md3 " id="tree_menu">
      </div>
      <div class="layui-col-xs5 layui-col-sm6 layui-col-md9">
              <form class="layui-form layui-card-body" lay-filter="filter_form_add">
                  <div class="layui-form-item">
                      <label class="layui-form-label">菜单编码</label>
                      <div class="layui-input-block">
                          <input type="text" name="menuCode" autocomplete="off" class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item">
                      <label class="layui-form-label">菜单名称</label>
                      <div class="layui-input-block">
                          <input type="text" name="menuName" lay-verify="required" placeholder="菜单名称" autocomplete="off"
                              class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item">
                      <label class="layui-form-label">上级菜单</label>
                      <div class="layui-input-block">
                          <input type="text" name="parentMenuCode" placeholder="上级菜单" autocomplete="off"
                              class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item">
                      <label class="layui-form-label">菜单样式</label>
                      <div class="layui-input-block">
                          <input type="text" name="style" placeholder="菜单样式" autocomplete="off"
                              class="layui-input">
                      </div>
                  </div>
                  <div class="layui-form-item">
                      <label class="layui-form-label">子节点</label>
                      <div class="layui-input-block">
                          <input type="radio" name="leaf" value="1" title="是" checked="">
                          <input type="radio" name="leaf" value="0" title="否">
                      </div>
                  </div>
                  <div class="layui-form-item">
                      <label class="layui-form-label">菜单路径</label>
                      <div class="layui-input-block">
                          <input type="text" name="path" placeholder="菜单路径" autocomplete="off"
                              class="layui-input">
                      </div>
                  </div>
                  <div class="layui-input-block">
                      <button class="layui-btn" lay-submit lay-filter="form_submit">提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                  </div>
              </form>
      </div>
  </div>
</div>
<script src="../static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
<script src="../static/js/index.js" data-main="main" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['layer','form','tree'], function() {
        var layer = layui.layer ,form = layui.form ,$=layui.$,main = layui.main,tree = layui.tree;

        layui.tree({
            elem: '#tree_menu' //传入元素选择器
            ,nodes: [
                { //节点
                    name: '父节点1'
                    ,children: [{
                    name: '子节点11'
                    },{
                    name: '子节点12'
                    }]
                },
                {
                    name: '父节点2（可以点左侧箭头，也可以双击标题）'
                    ,children: [
                        {
                        name: '子节点21'
                        ,children: [
                            {
                                name: '子节点211'
                            }
                        ]
                        }
                    ]
                }
            ]
        });
    });
</script>
</body>

</html>